<?php $this->load->view('layout/header');?>
<div class="supplier-content-page">
    <div class="product-test-h5">
        <ul class="breadcrumb">
            <li><a href="javascript:;">我的账户</a></li>
            <li class="active"><a href="<?php echo site_url('accountinfo/accountRecord');?>">账户信息</a></li>
        </ul>
        <?php echo execute_alert_message();?>
        <?php $this->load->view('accountinfo/common');?>
        <div class="subject-table">
            <div class="account-record-nav clearfix">
                <a href="<?php echo site_url('accountinfo/accountRecord');?>" class="active">账户收支</a>
                <a href="<?php echo site_url('accountinfo/carryRecord');?>">提现记录</a>
                <a href="<?php echo site_url('accountinfo/rechargeRecord');?>">充值记录</a>
                <a href="<?php echo site_url('accountinfo/rebateRecord');?>">返利记录</a>
            </div>
            <?php if ($accountRecord->num_rows() > 0) :?>
                <table class="table table-bordered">
                    <tr>
                        <th>收支单号</th>
                        <th>收支类型</th>
                        <th>收支账户</th>
                        <th>收支金额</th>
                        <th>收支时间</th>
                    </tr>
                    <?php foreach ($accountRecord->result() as $item):?>
                    <tr>
                        <td><?php echo $item->order_id;?></td>
                        <td>
                            <?php
                                $type_name = '';
                                if ($item->product_type == 'hotel') {
                                    $type_name = '酒店';
                                } elseif ($item->product_type == 'line') {
                                    $type_name = '线路';
                                } elseif ($item->product_type == 'tourism') {
                                    $type_name = '商品';
                                }
                                echo $type_name, $levelType[$item->type];
                            ?>
                        </td>
                        <td><?php echo $accountType[$item->account_type];?></td>
                        <td>
                            <?php if (in_array($item->type, array(PAY, CASH, DEDUCTION))) :?>
                                <p class="minus">-<?php echo $item->amount;?></p>
                            <?php else : ?>
                                <p class="additive">+<?php echo $item->amount;?></p>
                            <?php endif;?>
                        </td>
                        <td><?php echo $item->date;?></td>
                    </tr>
                    <?php endforeach;?>
                </table>
                <nav><?php echo $pg_link;?></nav>
            <?php else :?>
                <div class="none-data">暂无数据</div>
            <?php endif;?>
        </div>
    </div>
</div>
<?php $this->load->view('layout/footer');?>